package org.blueoxygen.kukuruyuk.actions.supplier;
import java.util.ArrayList;
import java.util.List;
import org.blueoxygen.cimande.persistence.PersistenceAware;
import org.blueoxygen.cimande.persistence.PersistenceManager;
import org.blueoxygen.cimande.security.SessionCredentials;
import org.blueoxygen.cimande.security.SessionCredentialsAware;
import org.blueoxygen.kukuruyuk.entity.Supplier;
import org.blueoxygen.kukuruyuk.entity.Address;
import com.opensymphony.xwork2.ActionSupport;
public class SupplierForm extends ActionSupport
implements PersistenceAware, SessionCredentialsAware {
protected PersistenceManager manager;
protected SessionCredentials sessionCredentials;
private Supplier Supplier = new Supplier();
private List<Supplier> Suppliers = new ArrayList<Supplier>();



public String execute(){
		if(getSupplier().getId() != null &&
			!"".equalsIgnoreCase(getSupplier().getId().trim())){
			setSupplier((Supplier) manager.getById(Supplier.class, getSupplier().getId()));
		}
		
			return SUCCESS;
		}
	public void setPersistenceManager(PersistenceManager persistenceManager){
		this.manager = persistenceManager;
	}
	public void setSessionCredentials(SessionCredentials sessionCredentials){
		this. sessionCredentials = sessionCredentials;
	}
	public Supplier getSupplier() {
		return Supplier;
	}
	public void setSupplier(Supplier supplier) {
		this.Supplier = supplier;
	}
	public List<Supplier> getSuppliers() {
		return Suppliers;
	}
	public void setSuppliers(List<Supplier> suppliers) {
		this.Suppliers = suppliers;
	}
	
	
	}
